package whlogger.launcher.loginfields.views.repositories;

import javax.swing.JPasswordField;
import javax.swing.JTextField;
import whlogger.launcher.loginfields.views.controller.LogInJPanelController;
import whlogger.launcher.loginfields.views.eventlistener.LoginJButtonActionListener;
import whlogger.launcher.loginfields.views.eventlistener.RegisterJButtonActionListener;

/**
 *
 * @author d3rbastl3r
 */
public class ListenerRepository {
    private LoginJButtonActionListener loginJButtonActionListener = null;
	private RegisterJButtonActionListener registerJButtonActionListener = null;
	
	public LoginJButtonActionListener getLoginJButtonActionListener(){
		return this.loginJButtonActionListener;
	}
	
	public void initLoginJButtonActionListener(LogInJPanelController controller, JTextField nickname, JPasswordField password){
		this.loginJButtonActionListener = new LoginJButtonActionListener();
		this.loginJButtonActionListener.setController(controller);
		this.loginJButtonActionListener.setNickname(nickname);
		this.loginJButtonActionListener.setPassword(password);
	}
	
	public RegisterJButtonActionListener getRegisterJButtonActionListener(){
		return this.registerJButtonActionListener;
	}
	
	public void initRegisterJButtonActionListener(LogInJPanelController controller){
		this.registerJButtonActionListener = new RegisterJButtonActionListener();
		this.registerJButtonActionListener.setController(controller);
	}
}
